#ifndef __arena_pole_cart_h__
#define __arena_pole_cart_h__

#include <string>
#include <vector>

#include "arena_base.h"

class Predictor_link;

class Arena_pole_cart : public Arena_base
{
 public:
  Arena_pole_cart();
  ~Arena_pole_cart();

  void update( float time );

  void reset( void );

  void push( double force );
  boost::function<void(float)> push_function( void );

  double *get_theta_p( void );
  double *get_theta_velocity_p( void );
  double *get_cart_position_p( void );
  double *get_cart_velocity_p( void );

 private:
   // state variables
   double _theta;
   double _position;
   double _dtheta;
   double _dposition;

   // forcing
   double _F;

   // parameters
   double _g;
   double _mass_pole;
   double _mass_cart;
   double _length_pole;

   void update_state( float time );
   void update_arena(void);

};

#endif
